#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>

typedef enum{
	EGOTOPICPullRefreshPulling = 0,
	EGOTOPICPullRefreshNormal,
	EGOTOPICPullRefreshLoading,	
} EGOTopicPullRefreshState;

@protocol EGORefreshTableTopicDelegate;
@interface EGORefreshTableTopicView : UIView {
	
	id _delegate;
	EGOTopicPullRefreshState _state;

	UILabel *_lastUpdatedLabel;
	UILabel *_statusLabel;
//	CALayer *_arrowImage;
//	UIActivityIndicatorView *_activityView;
    IBOutlet UIImageView        *_indicator;
    int rolling;
    int alpha;
}

@property(nonatomic,assign) id <EGORefreshTableTopicDelegate> delegate;

- (id)initWithFrame:(CGRect)frame textColor:(UIColor *)textColor;
- (void)refreshLastUpdatedDate;
- (void)egoRefreshScrollViewDidScroll:(UIScrollView *)scrollView;
- (void)egoRefreshScrollViewDidEndDragging:(UIScrollView *)scrollView;
- (void)egoRefreshScrollViewDataSourceDidFinishedLoading:(UIScrollView *)scrollView;

@end
@protocol EGORefreshTableTopicDelegate
- (void)egoRefreshTableTopicDidTriggerRefresh:(EGORefreshTableTopicView*)view;
- (BOOL)egoRefreshTableTopicDataSourceIsLoading:(EGORefreshTableTopicView*)view;
@optional
- (NSDate*)egoRefreshTableTopicDataSourceLastUpdated:(EGORefreshTableTopicView*)view;
@end
